package com.company.L_4_1;

import java.lang.reflect.Constructor;

/**
 * Created by vilen on 2015/3/28.
 */
public class ClassUtil_3{
//打印构造函数的信息
    public static void printMessage(Object obj){
        Class c = obj.getClass();
        Constructor[] con = c.getConstructors();
        for (Constructor constructor : con){
            System.out.print(constructor.getName()+"(");
            Class[] parameters = constructor.getParameterTypes();
            for(Class class1: parameters){
                System.out.print(class1.getName()+",");
            }
            System.out.println(")");
        }
    }
}
